package com.burstly.lib.network.beans.cookie;

import java.util.Date;

public final class CookieHolderWrapper
{
  private final CookieHolder mCookie;
  private long mExpirationTime;

  CookieHolderWrapper(CookieHolder paramCookieHolder)
  {
    this(paramCookieHolder, extendLifetime(paramCookieHolder.getMaxage().intValue()));
  }

  CookieHolderWrapper(CookieHolder paramCookieHolder, long paramLong)
  {
    this.mCookie = paramCookieHolder;
    this.mExpirationTime = paramLong;
  }

  private static long extendLifetime(long paramLong)
  {
    return 1000L * paramLong + System.currentTimeMillis();
  }

  public boolean equals(Object paramObject)
  {
    if (this == paramObject);
    CookieHolderWrapper localCookieHolderWrapper;
    do
    {
      do
      {
        return true;
        if (paramObject == null)
          return false;
        if (getClass() != paramObject.getClass())
          return false;
        localCookieHolderWrapper = (CookieHolderWrapper)paramObject;
        if (this.mCookie != null)
          break;
      }
      while (localCookieHolderWrapper.mCookie == null);
      return false;
    }
    while (this.mCookie.equals(localCookieHolderWrapper.mCookie));
    return false;
  }

  public CookieHolder getCookie()
  {
    return this.mCookie;
  }

  public long getExpirationTime()
  {
    return this.mExpirationTime;
  }

  public int hashCode()
  {
    if (this.mCookie == null);
    for (int i = 0; ; i = this.mCookie.hashCode())
      return i + 31;
  }

  void setNewMaxAge(int paramInt)
  {
    this.mCookie.setMaxage(Integer.valueOf(paramInt));
    this.mExpirationTime = extendLifetime(paramInt);
  }

  public String toString()
  {
    return "CookieHolderWrapper [cookie=" + this.mCookie + ", expirationTime=" + new Date(this.mExpirationTime) + "]";
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.burstly.lib.network.beans.cookie.CookieHolderWrapper
 * JD-Core Version:    0.6.2
 */